package com.gongyinlian.personalprofilewebsiteserver.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 登录响应VO
 * 
 * @author personal-profile-website
 * @date 2024-10-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "登录响应数据")
public class LoginResponse implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 访问令牌
     */
    @Schema(description = "访问令牌")
    private String accessToken;
    
    /**
     * 刷新令牌
     */
    @Schema(description = "刷新令牌")
    private String refreshToken;
    
    /**
     * 令牌类型
     */
    @Schema(description = "令牌类型", example = "Bearer")
    @lombok.Builder.Default
    private String tokenType = "Bearer";
    
    /**
     * 过期时间（毫秒）
     */
    @Schema(description = "过期时间（毫秒）")
    private Long expiresIn;
    
    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;
    
    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;
    
    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;
    
    /**
     * 头像
     */
    @Schema(description = "头像URL")
    private String avatar;
    
    /**
     * 角色
     */
    @Schema(description = "角色", example = "admin")
    private String role;
}

